package com.jar.redisrelated.controller;

import com.jar.redisrelated.annotation.RedisCache;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RedisController {
	@RequestMapping("/redis")
	@RedisCache(key = "'study:' + #id +':' + #name")
	public String redisTest(String name, Integer id) {
		return "欢迎来到redis世界";
	}
}
